#pragma once
#include "RootWindow.h"


class CSwitchCityController
: public CAViewController
, public CAPickerViewDataSource
, public CAPickerViewDelegate
{
public:
	CSwitchCityController();
	virtual ~CSwitchCityController();

protected:
	void viewDidLoad();
	void viewDidUnload();
	void viewDidAppear();
	void viewDidDisappear();
	void keyBackClicked();
	void setDefaultCity();
	void saveSelectCity(CAControl* target, CCPoint point);
    void didSelectRow(CAPickerView* pickerView, unsigned int row, unsigned int component);
    unsigned int numberOfComponentsInPickerView(CAPickerView* pickerView);
    unsigned int numberOfRowsInComponent(CAPickerView* pickerView, unsigned int component);
	float widthForComponent(CAPickerView* pickerView, unsigned int component);
	float rowHeightForComponent(CAPickerView* pickerView, unsigned int component);
	const char* titleForRow(CAPickerView* pickerView, unsigned int row, unsigned int component);
	void onClickBtnSaveOk(int index);
	void loadCityConfigs();
private:
	int m_nCurSelectRow1;
	int m_nCurSelectRow2;
};

